#include<stdbool.h>
const int N = 110;

int set_inter(int A[], int Asize, int B[], int Bsize, int C[])
{
    bool hash[N];
    for (int i = 0; i < N; i++)    hash[i] = false;

    int pos = 0;
    for (int i = 0; i < Asize; i++)
        if (!hash[A[i]])
            hash[A[i]] = true;

    for (int i = 0; i < Bsize; i++)
    {
        if (hash[B[i]])
            C[pos++] = B[i];
    }
    return pos;
}